Xbasic

PrimaryProcessor Function

Syntax

ProcessorNumber as N = PrimaryProcessor()

Description

Get the index of the primary CPU for the process. The PrimaryProcessor() function returns the zero-based index of the processor Alpha Anywhere is using. If (for some reason) the user manages to undercut Alpha Anywhere and set its Process Affinity to more than one CPU, this function will return -1.

Example

This example shows that Alpha Anywhere is running on the first processor.

? PrimaryProcessor()
= 0

See Also